<div id="content">
    
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%"><?php echo $formFind; ?></td>
    <td width="50%"><?php echo " " ?></td> 
  </tr>
</table>

			<div class="content-box"><!-- Start Content Box -->
				
		
				<?php echo notify_get_messages(); ?>
     <div class="grid-view" id="admins-grid">
<?php         
        $tmpl = array ( 'table_open'  => '<table border="0" cellpadding="0" cellspacing="0" class="items" >' );
        $this->table->set_template($tmpl);
        
        $this->table->set_heading(smHeaderSort('id', 'works', t('id')), smHeaderSort('title', 'works', t('title')), smHeaderSort('complate', 'works', t('complate')), smHeaderSort('order', 'works', t('order')), smHeaderSort('status', 'works', t('status')), smHeaderSort('created', 'works', t('created')), 
                anchor('works/add', t('Add'), 'title="'.t('Add').'" class="button green" style="text-align: center; width:100px;"'));
        foreach ($query->result_array() as $row) {
            $urlEdit = anchor(site_url("works/edit/".$row["id"]), '<img src="'.root_url().'data/admin/update.png" alt="Update">', 'title="'.t('Sửa').'" class="btnEdit"');
            $urlDel = ianchor('#', '<img src="'.root_url().'data/admin/delete.png" alt="Delete">', 'onclick="if(window.confirm(\''.t('msg_del').' '.$row["title"].'\')) 
	               window.location=\''.site_url("works/del/".$row["id"]).'\';" class="btnDel" title="'.t('Xóa').'"');
            $comp = '<a href="javascript:void(0)" rel="/admin/works/comp/'.$row['id'].'" class="complate">Comp</a>';    
            switch($row["status"]) {
                case 0 : $status = '<a href="javascript:void()" class="clsStatus">NY Complate</a>'; break;
                case 1 : $status = '<a href="javascript:void()" class="clsStatus">Complate</a>'; break;
                default: $status = '<a href="javascript:void()" class="clsStatus">Wating</a>'; break;
            }                   
                   
            $this->table->add_row($row["id"], $row["title"], $row["complate"], $row["order"], 
                $status, date('d-m-Y H:i:s', $row["created"]),  $urlEdit. nbs(3) . $urlDel);
        }
        
        echo $this->table->generate();
    
 ?>       
 <tfoot>
                      <tr>
                        <td colspan="5"><div class="pagination"><?php echo $paging;?></div>
                          <!-- End .pagination -->
                          <div class="clear"></div></td>
                      </tr>
                    </tfoot>         			    
     </div> 
				<!-- End .content-box-content -->
				
			</div> <!-- End .content-box --><!-- End .content-box --><!-- End .content-box -->
<div class="clear"></div>
			
			
			<!-- Start Notifications -->
			<!-- End Notifications -->
			
		  <div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						<?php echo power;?>
				</small>
			</div><!-- End #footer -->
			
		</div> <!-- End #main-content -->